package com.qin.mall.openfeign.discount;

import com.qin.mall.common.api.CommonResult;
import com.qin.malldiscount.domain.SmsFlashPromotionProductRelation;
import com.qin.malldiscount.dto.SmsFlashPromotionProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 限时购和商品关系管理 远程调用
 * @author Leisure
 * create 2022 2022/11/25 2:32
 **/
@FeignClient("discount-manage")
public interface SmsFlashPromotionProductRelationFeigin {

    /**
     * 批量选择商品添加关联
     */
    @PostMapping("/flashProductRelationManage/create")
    @ResponseBody
    public CommonResult create(@RequestBody List<SmsFlashPromotionProductRelation> relationList);

    /**
     * 删除关联相关信息
     */
    @PostMapping("/flashProductRelationManage/delete/{id}")
    @ResponseBody
    public CommonResult delete(@PathVariable Long id);

    /**
     * 修改关联相关信息
     */
    @PostMapping("/flashProductRelationManage/update/{id}")
    @ResponseBody
    public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionProductRelation relation);
    

    /**
     * 获取管理商品促销信息
     */
    @GetMapping("/flashProductRelationManage/{id}")
    @ResponseBody
    public CommonResult<SmsFlashPromotionProductRelation> getItem(@PathVariable Long id);

    /**
     * 分页查询不同场次关联及商品信息
     */
    @GetMapping("/flashProductRelationManage/list")
    @ResponseBody
    public List<SmsFlashPromotionProduct> list(@RequestParam(value = "flashPromotionId") Long flashPromotionId,
                                                                        @RequestParam(value = "flashPromotionSessionId") Long flashPromotionSessionId,
                                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);
    
    
    }
